//
//  EnergyBenchmarkingView.h
//  cocoapodText
//
//  Created by apple on 16/9/10.
//  Copyright © 2016年 apple. All rights reserved.
//

#ifndef EnergyBenchmarkingView_h
#define EnergyBenchmarkingView_h


#endif /* EnergyBenchmarkingView_h */
//导入时需要手动打上，系统没有提示
#import "Charts-Swift.h"
#import "CommonTool.h"
#import "NirKxMenu.h"
#import <UIKit/UIKit.h>
#import "queryDataInfo.h"
#import "MyUIDatePicker.h"
#import "duibiaoTableCell.h"
#import "areaTableRadioCell.h"
#import "duibiaoDataTableCellview.h"

@class EnergyBenchmarkingView;

//一个协议可以扩展另一个协议，例如FSLoginViewDelegate扩展了NSObject协议
@protocol GYEnergyBenchmarkingViewDelegate <NSObject>

@required //@required修饰的方法必须实现
-(void)onSetData:(EnergyBenchmarkingView *)energyBenchmarkingView;
-(void)onInitFristChartTableData:(EnergyBenchmarkingView*)energyBenchmarkingView esCode:(NSString *)esCode;
-(void)onQueryChartData:(EnergyBenchmarkingView*)energyBenchmarkingView esCode:(NSString *)esCode xslx:(NSString *)xslx startTime:(NSString *)startTime orgid:(NSString *)orgid structType:(NSString *)structType contrastType:(NSString *)contrastType contrastName:(NSString *)contrastName;
@end

@interface EnergyBenchmarkingView : UIView
//全局背景
@property(nonatomic,strong)UIView *AllBackView;
//左侧菜单
@property(nonatomic,strong)UITableView *GYMeunTableView;
///右侧查询
//右侧全背景
@property(nonatomic,strong)UIView *rightAllBackView;

/**************************/
//选中的地区
@property(nonatomic,retain)NSString *currentAreaName;
//正在操作的menu
@property(nonatomic,retain)NSString *currentMenu;
//选择条件
@property(nonatomic,strong)UILabel *energyTypeMenu;
@property(nonatomic,strong)UILabel *showTypeMenu;
@property(nonatomic,strong)UILabel *startTimeMenu;
@property(nonatomic,strong)UILabel *duibiTypeMenu;
@property(nonatomic,retain)NSString *energyType;
@property(nonatomic,retain)NSString *xslxType;
@property(nonatomic,retain)NSString *startTime;
@property(nonatomic,retain)NSString *orgid;
@property(nonatomic,retain)NSString *contrastType;
@property(nonatomic,retain)NSString *contrastName;
/*************************/

//右侧滑动背景
@property(nonatomic,strong)UIScrollView *chartAndQueryTableBack;
//表格
@property(nonatomic,strong)UITableView *queryTableView;
//表格头部
@property(nonatomic,strong)UIView *queryTabletopView;
@property(nonatomic,strong)duibiaoDataTableCellview *tableCellView;
//表格横向滑动
@property(nonatomic,strong)UIScrollView *queryTableBack;
//时间选择
@property(nonatomic,strong)MyUIDatePicker *datePicker;
@property(nonatomic)BOOL is_picker_show;
@property(nonatomic,strong)UIView *pickerOverlay;

//柱状图
@property(nonatomic,strong)UILabel *chartTitle;
@property(nonatomic,strong)BarChartView *energyBarChart;
#pragma mark 柱状图数据
@property(nonatomic,retain)NSMutableArray *xValsEnergyLine;
@property(nonatomic,retain)NSMutableArray *yValsEnergyLine;
@property(nonatomic,retain)NSMutableArray *barColors;
@property(nonatomic,retain)NSString *title;

#pragma mark - 属性
#pragma mark 代理属性，同时约定作为代理的对象必须实现KCButtonDelegate协议
@property (nonatomic,retain) id<GYEnergyBenchmarkingViewDelegate> delegate;

#pragma mark - 公共方法
-(void)setData;
-(void)multipleBarChartData:(NSArray *)legend;
-(void)setGYMenuTableData:(NSArray *)array;
-(void)setGYMenuEnergyTypeData:(NSArray *)array;
-(void)setInitCondition;
-(void)setEnergyTableWithTitle:(NSString *)title header:(NSDictionary *)tableHeaderObj Data:(NSArray *)tableBodyObj;
-(void)dismissMenu;
@end
